﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Reflection;
using SharedDataContracts;

namespace BacteriumObserver
{
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
                     ConcurrencyMode = ConcurrencyMode.Multiple)]
    public class BacteriumReporter : IBacteriumReporter
    {
        private Dictionary<String, BacteriumProfile> _bacteria;

        internal Dictionary<String, BacteriumProfile> Bacteria
        {
            get { return _bacteria; }
            set { _bacteria = value; }
        }
        
        public Object CS { get; set; }

        public BacteriumReporter()
        {
            
        }

        public List<BacteriumProfile> GetDomainSnapshot()
        {
            Console.WriteLine("Reporter: GetDomainSnapshot call \n");
            
            //lock (CS)
            //{
                return new List<BacteriumProfile>(Bacteria.Values);
            //}
        }

        
    }
}
